// src/bin/sircuti.rs: Binary entrypoint.
//
// This file is part of sir-cut-esolang.
//
// sir-cut-esolang is free software: you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// sir-cut-esolang is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with sir-cut-esolang.  If not, see <https://www.gnu.org/licenses/>.

#![warn(clippy::all)]

use clap::{clap_app, crate_authors, crate_description, crate_version, App};

fn main() {
    let matches = build_app().get_matches();

    println!("matches: {:?}", matches);
}

fn build_app() -> App<'static, 'static> {
    clap_app!(sircuti =>
        (version: (crate_version!()))
        (author: (crate_authors!()))
        (about: (crate_description!()))
        (@arg program: <FILE> "\
The file to read the program from.
If there are multiple, they will be
concatenated and executed as one program.

If \"-\" is used instead of a file path,
the program will be read from standard input.
If the program requests any input when
stdin is being used as a program source,
the interpreter will exit with an error.")
        (@group action +required =>
            (@arg interpret: -i --interpret "Interpret the program and print output to stdout.")
            (@arg unicodify: -u --unicodify "Pretty-print the program using Unicode characters.")
        )
    )
}
